{layout name="layout" /}

<article>
  <div class="timebox">
    <ul>
      {foreach $data.lists as $val}
      <li><span>{$val.pubtime|date='Y-m-d', ###}</span><i><a href="/{$val.pubtime|date='Y/m/d', ###}/{$val.id}" title="{$val.title}">{$val.title}</a></i></li>
      {/foreach}
    </ul>
  </div>
  <div class="pagelist">
    <a title="Total record">共&nbsp;<b>{$data.pages}</b>页</a>&nbsp;&nbsp;&nbsp;
      {neq name="page" value="1"}
       <a href="{:url('/time/1')}">首页</a>
       <a href="{:url('/time/'.($page - 1))}">上一页</a>&nbsp;
      {/neq}
      {php}$start = ceil($page/6)*6-5;{/php}
      {for start="$start" end="$start+6" comparison="lt" step="1" name="npage"}
        {eq name="page" value="$npage"}
        <b>{$npage}</b>&nbsp;
        {else}
        <a href="{:url('/time/'.$npage)}">{$npage}</a>&nbsp;
        {/eq}
      {/for}
      <a href="{:url('/time/'.($page + 1))}">下一页</a>&nbsp;
      <a href="{:url('/time/'.$data.pages)}">尾页</a>
  </div>
</article>